<template>
    <div class="huadong-product-filter">
        <search-form :searchArray="searchArray">
        </search-form>
         <elTable :formData="formData" @tableData="getList" ref="dataInfo">
                <el-table-column prop="id" label="产品名称" align="center"></el-table-column>
                <el-table-column prop="group" label="供应商给货价" align="center"></el-table-column>
                <el-table-column prop="group" label="批准文号" align="center"></el-table-column>
                <el-table-column prop="loginTime" label="生产厂家" align="center"></el-table-column>
                <el-table-column prop="loginTime" label="产品ID" align="center"></el-table-column>
                <el-table-column prop="loginTime" label="产品编码" align="center"></el-table-column>
                <el-table-column prop="loginTime" label="产品规格" align="center"></el-table-column>
                <el-table-column prop="loginTime" label="禁/启用" align="center"></el-table-column>
            </elTable>
    </div>
</template>
<script>
import elTable from "@/components/xForm/elTable"
export default {
    name: 'huadongProductFilter',
    components: {
        elTable
    },
    data () {
        return {
            formData: {
                currentPage: 1,
                pageSize: 10,
            },
            searchArray: [
                {
                    type: "input",
                    placeholder: "请输入产品名称",
                    types: "text",
                    value: "",
                    label: "产品名称"
                },
                {
                    type: "input",
                    placeholder: "请输入批准文号",
                    types: "text",
                    value: "",
                    label: "批准文号"
                },
                {
                    type: "input",
                    placeholder: "请输入生产厂家",
                    types: "text",
                    value: "",
                    label: "生产厂家"
                },
            ],
        }
    },
    methods: {
        getList(pageNo) {
            let dataInfo = [
                {
                    id: 1,
                    name: "你好",
                    createTime: '1595244696000'
                },
                {
                    id: 2,
                    name: "你好1",
                    createTime: '1595244696000'
                },
            ];
            let total = 10;
            this.$nextTick(() => {
                this.$refs.dataInfo.loadData(dataInfo, total);
            });
        }
    }
}
</script>
<style lang="scss" scoped>
.huadong-product-filter {
    .search-form {
        margin-bottom: 16px;
    }
}
</style>